package com.daJiao.interceptor;


import me.chanjar.weixin.common.bean.WxOAuth2UserInfo;

/**
 * <p>Title:      WxUserThreadLocal. </p>
 * <p>Description 存放微信的用户 </p>
 * <p>Copyright: Copyright (c) 2016</p>
 * <p>Company:    医百科技有限公司 </p>
 *
 * @author         <a href="yangwensheng@100doc.com.cn"/>杨文生</a>
 * @since      2021/3/28 21:11
 */
public class WxUserThreadLocal {

  private static final ThreadLocal<WxOAuth2UserInfo> userThread = new ThreadLocal<>();

  public static void set(WxOAuth2UserInfo user) {

    userThread.set(user);
  }

  public static WxOAuth2UserInfo get() {

    return userThread.get();
  }

  public static void remove() {
    userThread.remove();
  }
}
